/*
 * @(#)MaintMtmWfProgressNotifyRuleForm.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.web;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.TextUtility;
import com.dcivision.framework.bean.AbstractBaseObject;
import com.dcivision.framework.web.AbstractActionForm;
import com.dcivision.workflow.bean.MtmWorkflowProgressNotifyRule;

/**
  MaintMtmWfProgressNotifyRuleForm.java

  This class is the for web form purpose.

  @author      Dick.xie
  @company     DCIVision Limited
  @creation date   10/01/2005
  @version     $Revision: 1.2 $
*/

public class MaintMtmWorkflowProgressNotifyRuleForm extends AbstractActionForm {

  public static final String REVISION = "$Revision: 1.2 $";

  private String workflowProgressID = null;
  private String notifyTrigger = null;
  private String notifyAtField = null;
  private String notifyAtAmt = null;
  private String notifyAckMethod = null;
  private String stepSeq = null;
  private String stepName = null;
  private String arrivedDate = null;
  private String dueDate = null;
  private String notifyAckMethodByEmail = null;
  private String notifyAckMethodBySystem = null;
  private String notificationRuleListValue = null;


  public MaintMtmWorkflowProgressNotifyRuleForm() {
    super();
  }

  public String getWorkflowProgressID() { 
    return(this.workflowProgressID);
  }

  public void setWorkflowProgressID(String workflowProgressID) { 
    this.workflowProgressID = workflowProgressID;
  }

  public String getNotifyTrigger() { 
    return(this.notifyTrigger);
  }

  public void setNotifyTrigger(String notifyTrigger) { 
    this.notifyTrigger = notifyTrigger;
  }

  public String getNotifyAtField() { 
    return(this.notifyAtField);
  }

  public void setNotifyAtField(String notifyAtField) { 
    this.notifyAtField = notifyAtField;
  }

  public String getNotifyAtAmt() { 
    return(this.notifyAtAmt);
  }

  public void setNotifyAtAmt(String notifyAtAmt) { 
    this.notifyAtAmt = notifyAtAmt;
  }

  public String getNotifyAckMethod() { 
    return(this.notifyAckMethod);
  }

  public void setNotifyAckMethod(String notifyAckMethod) { 
    this.notifyAckMethod = notifyAckMethod;
  }
  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    return super.validate(mapping, request);
  }
  
  public String getArrivedDate() {
    return arrivedDate;
  }
  
  public void setArrivedDate(String arrivedDate) {
    this.arrivedDate = arrivedDate;
  }
  
  public String getDueDate() {
    return dueDate;
  }
  
  public void setDueDate(String dueDate) {
    this.dueDate = dueDate;
  }
  
  public String getStepName() {
    return stepName;
  }
  
  public void setStepName(String stepName) {
    this.stepName = stepName;
  }
  
  public String getStepSeq() {
    return stepSeq;
  }
  
  public void setStepSeq(String stepSeq) {
    this.stepSeq = stepSeq;
  }
  
  public String getNotifyAckMethodByEmail() {
    return notifyAckMethodByEmail;
  }
  
  public void setNotifyAckMethodByEmail(String notifyAckMethodByEmail) {
    this.notifyAckMethodByEmail = notifyAckMethodByEmail;
  }
  
  public String getNotifyAckMethodBySystem() {
    return notifyAckMethodBySystem;
  }
  
  public void setNotifyAckMethodBySystem(String notifyAckMethodBySystem) {
    this.notifyAckMethodBySystem = notifyAckMethodBySystem;
  }
  
  public String getNotificationRuleListValue() {
    return notificationRuleListValue;
  }
  
  public void setNotificationRuleListValue(String notificationRuleListValue) {
    this.notificationRuleListValue = notificationRuleListValue;
  }
  
  public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
    this.setID(null);
    this.setWorkflowProgressID(null);
    this.setNotifyTrigger(null);
    this.setNotifyAtField(null);
    this.setNotifyAtAmt(null);
    this.setNotifyAckMethod(null);
    this.setRecordStatus(null);
    this.setUpdateCount(null);
    this.setCreatorID(null);
    this.setCreateDate(null);
    this.setUpdaterID(null);
    this.setUpdateDate(null);
  }

  public AbstractBaseObject getFormData() throws ApplicationException {
    MtmWorkflowProgressNotifyRule tmpMtmWorkflowProgressNotifyRule = new MtmWorkflowProgressNotifyRule();
    tmpMtmWorkflowProgressNotifyRule.setID(TextUtility.parseIntegerObj(this.getID()));
    tmpMtmWorkflowProgressNotifyRule.setWorkflowProgressID(TextUtility.parseIntegerObj(this.getWorkflowProgressID()));
    tmpMtmWorkflowProgressNotifyRule.setNotifyTrigger(this.getNotifyTrigger());
    tmpMtmWorkflowProgressNotifyRule.setNotifyAtField(TextUtility.parseIntegerObj(this.getNotifyAtField()));
    tmpMtmWorkflowProgressNotifyRule.setNotifyAtAmt(TextUtility.parseIntegerObj(this.getNotifyAtAmt()));
    tmpMtmWorkflowProgressNotifyRule.setNotifyAckMethod(this.getNotifyAckMethod());
    tmpMtmWorkflowProgressNotifyRule.setRecordStatus(this.getRecordStatus());
    tmpMtmWorkflowProgressNotifyRule.setUpdateCount(TextUtility.parseIntegerObj(this.getUpdateCount()));
    tmpMtmWorkflowProgressNotifyRule.setCreatorID(TextUtility.parseIntegerObj(this.getCreatorID()));
    tmpMtmWorkflowProgressNotifyRule.setCreateDate(parseTimestamp(this.getCreateDate()));
    tmpMtmWorkflowProgressNotifyRule.setUpdaterID(TextUtility.parseIntegerObj(this.getUpdaterID()));
    tmpMtmWorkflowProgressNotifyRule.setUpdateDate(parseTimestamp(this.getUpdateDate()));
    return tmpMtmWorkflowProgressNotifyRule;
  }

  public void setFormData(AbstractBaseObject baseObj) throws ApplicationException {
    MtmWorkflowProgressNotifyRule tmpMtmWorkflowProgressNotifyRule = (MtmWorkflowProgressNotifyRule)baseObj;
    this.setID(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getID()));
    this.setWorkflowProgressID(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getWorkflowProgressID()));
    this.setNotifyTrigger(tmpMtmWorkflowProgressNotifyRule.getNotifyTrigger());
    this.setNotifyAtField(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getNotifyAtField()));
    this.setNotifyAtAmt(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getNotifyAtAmt()));
    this.setNotifyAckMethod(tmpMtmWorkflowProgressNotifyRule.getNotifyAckMethod());
    this.setRecordStatus(tmpMtmWorkflowProgressNotifyRule.getRecordStatus());
    this.setUpdateCount(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getUpdateCount()));
    this.setCreatorID(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getCreatorID()));
    this.setCreateDate(formatTimestamp(tmpMtmWorkflowProgressNotifyRule.getCreateDate()));
    this.setUpdaterID(TextUtility.formatIntegerObj(tmpMtmWorkflowProgressNotifyRule.getUpdaterID()));
    this.setUpdateDate(formatTimestamp(tmpMtmWorkflowProgressNotifyRule.getUpdateDate()));
  }
}
